#!/bin/sh

#
# Allows the user to override environmental variables if wanted. Only
# sets the environmental variable if the environmental variable has
# not already been set.
#
set_ifn()
{
	var=$1
	shift
	val=$1

	cmd="echo \$$var"
	existing=`eval $cmd`

	if [ -z "$existing" ]; then
		export $var=$val
	fi
}

set_ifn NEON_ID        test1
set_ifn NEON_TX_ADDR   localhost:7001
set_ifn NEON_DB_TYPE   sqlite
set_ifn NEON_DB_FILE   neon.db
set_ifn NEON_TYPE_FILE ""
set_ifn NEON_SYNC_INTERVAL 1

export PYTHONPATH=.

exec python neon/sync.py $* 
